package org.jeecg.modules.hc.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.hc.entity.HcAliPay;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @Description: 支付宝支付
 * @Author: jeecg-boot
 * @Date: 2023-01-12
 * @Version: V1.0
 */
public interface IHcAliPayService extends IService<HcAliPay> {

    boolean paynotify(Map<String, String> receiveMap) throws Exception;

    HcAliPay pay(String userId, BigDecimal total) throws AlipayApiException;

    HcAliPay preNativePay(String userId, BigDecimal total) throws AlipayApiException;

    HcAliPay queryPay(String payId) throws AlipayApiException;

    /**
     * 查询支付宝扫码支付结果
     * @param outTradeNum
     * @return
     */
    HcAliPay queryAliPayRes(String outTradeNum) throws AlipayApiException;
}
